/**
 * Created by Mark_ren on 2017/5/22.
 * 苟富贵,無相忘
 */
var Sequelize = require('sequelize');
module.exports = function (sequelize) {
    var clickLogModule = sequelize.define(
        'clickLog',
        {
            'id': {//与数据库表字段对应的模块字段
                'field': 'id',//数据库表的字段
                'type': Sequelize.STRING, 'primaryKey': true,
                'allowNull': false,
                'unique': true
            },
            'titleId': {
                'field': 'title_id',//标题ID
                'type': Sequelize.STRING,
                'allowNull': true,
            },
            'memberId': {
                'field': 'member_id',//会员ID
                'type': Sequelize.STRING,
                'allowNull': true,
            },
            'openId': {
                'field': 'open_id',//会员微信ID
                'type': Sequelize.STRING,
                'allowNull': true,
            },
            'ForwardMember': {
                'field': 'Forward_member',//转发人
                'type': Sequelize.STRING,
                'allowNull': true,
            },
            'item': {
                'field': 'item',//栏目
                'type': Sequelize.INTEGER,
                'allowNull': true,
            },
            'sort': {
                'field': 'sort',//模块
                'type': Sequelize.INTEGER,
                'allowNull': true,
            },
            'type': {
                'field': 'type',//分类
                'type': Sequelize.INTEGER,
                'allowNull': true,
            },
            'createTime': {
                'field': 'create_time',//创建时间
                'type': Sequelize.STRING,
                'allowNull': true,
            },
            'field1': {
                'field': 'field1',
                'type': Sequelize.STRING,
                'allowNull': true
            },
            'field2': {
                'field': 'field2',
                'type': Sequelize.STRING,
                'allowNull': true
            },
            'field3': {
                'field': 'field3',
                'type': Sequelize.STRING,
                'allowNull': true
            },
            'field4': {
                'field': 'field4',
                'type': Sequelize.STRING,
                'allowNull': true
            },
            'field5': {
                'field': 'field5',
                'type': Sequelize.STRING,
                'allowNull': true
            }

        },
        {
            'freezeTableName': true,// 默认false修改表名为复数，true不修改表名，与数据库表名同步
            'tableName': 'lm_click_log',
            timestamps: false,//时间戳为false是不需要下面的自动生成创建时间与更新时间，默认为true
        }
    );
    return clickLogModule;
};